package com.example.duanjunjie.learn.wk;

import org.json.JSONObject;

/**
 * Created by duanjunjie on 2018/7/21.
 */
public class WkMessage13 implements IWKNoticeMessageData {

    public String ctype;
    public Info info = new Info();

    @Override
    public void read(JSONObject jsonObject) {
        if (jsonObject != null) {
            ctype = jsonObject.optString("ctype");
            JSONObject infoJsonObject = jsonObject.optJSONObject("data");
            if (infoJsonObject != null) {
                info.read(infoJsonObject);
            }
        }
    }

    public class Info {
        public String my_score;
        public String roomid;
        public String stage;
        public String stage_score;
        public String user_current;
        public String user_total;

        void read(JSONObject jsonObject) {
            my_score = jsonObject.optString("my_score");
            roomid = jsonObject.optString("roomid");
            stage = jsonObject.optString("stage");
            stage_score = jsonObject.optString("stage_score");
            user_current = jsonObject.optString("user_current");
            user_total = jsonObject.optString("user_total");
        }
    }
}
